package com.suxin.aop;

import com.suxin.annotation.CurrentUser;
import org.springframework.aop.support.StaticMethodMatcherPointcutAdvisor;

import java.lang.reflect.Method;

/**
 * @author Tang
 * @classname DefaultStaticMethodMatcherPointcutAdvisor
 * @description [  ]
 * @date 2021/12/12 15:58
 */
public class DefaultStaticMethodMatcherPointcutAdvisor extends StaticMethodMatcherPointcutAdvisor {

    @Override
    public boolean matches(Method method, Class<?> targetClass) {
        return method.getAnnotation(CurrentUser.class) != null;
    }
}